@inject OrchardCore.ContentManagement.Metadata.IContentDefinitionManager ContentDefinitionManager
@{
    var contentItem = (IContent)Model.ContentItem;
    var contentTypeDisplayText = ContentDefinitionManager.GetTypeDefinition((string)Model.ContentItem.ContentType).DisplayName;
    var contentItemDisplayText = contentItem.ContentItem.DisplayText;
}
<div class="widget widget-editor card my-1 @(Model.Inline != true ? "collapsed" : "")">
    <div class="widget-editor-header card-header text-muted">
        @if (Model.CanMove != false)
        {
            <div class="widget-editor-handle"><i class="fas fa-arrows-alt"></i></div>
        }

        <button type="button" class="btn btn-outline-secondary btn-sm widget-editor-btn-toggle widget-editor-btn-collapse"><i class="fa fa-minus" aria-hidden="true"></i></button>
        <button type="button" class="btn btn-outline-secondary btn-sm widget-editor-btn-toggle widget-editor-btn-expand"><i class="fa fa-plus" aria-hidden="true"></i></button>
        <span data-content-type-display-text="@contentTypeDisplayText" class="widget-editor-header-text">@T["{0} {1}", contentItemDisplayText, contentTypeDisplayText]</span>
    </div>
    <div class="widget-editor-body card-body">
        <div class="col-12">
            @if (Model.ContentPreview != null)
            {
                @await DisplayAsync(Model.ContentPreview)
            }
        </div>
    </div>
    @if (Model.Footer != null)
    {
        <div class="widget-editor-footer card-footer  text-muted">
            @await DisplayAsync(Model.Footer)
        </div>
    }
</div>
